home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / lfs / lfsDirOpLog.h < prev    next >
C/C++ Source or Header  |  1990-10-19  |  2KB  |  56 lines

  1. /*
  2.  * lfsDirOpLog.h --
  3.  *
  4.  *    Declarations of directory operation log for a LFS file system.
  5.  *
  6.  * Copyright 1990 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/kernel/lfs/RCS/lfsDirOpLog.h,v 1.1 90/10/19 16:02:20 mendel Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _LFSDIROPLOG
  19. #define _LFSDIROPLOG
  20.  
  21. /* constants */
  22.  
  23. /* data structures */
  24.  
  25. typedef struct LfsDirOpLogBlockHdr {
  26.     int        magic;        /* Better be LFS_DIROP_LOG_MAGIC. */
  27.     int        size;        /* Size in bytes of log entries on block. */
  28.     int        nextLogBlock;    /* Block offset of the next log block in 
  29.                  * this segment.  */
  30.     int        reserved;    /* Reserved, must be zero. */
  31. } LfsDirOpLogBlockHdr;
  32.  
  33. typedef struct LfsDirOpLogEntryHdr {
  34.     int        logSeqNum;    /* Log sequence number of entry. */
  35.     int        opFlags;    /* Directory operation, see fsdm.h */
  36.     int        dirFileNumber;    /* Directory being operated on. */
  37.     int        dirOffset;    /* Offset into directory dirFileNumber of
  38.                  * entry. */
  39.     int        linkCount;    /* Link count of object before operation. */
  40. } LfsDirOpLogEntryHdr;
  41.  
  42. typedef struct LfsDirOpLogEntry {
  43.     LfsDirOpLogEntryHdr    hdr;      /* Operation type, fileNumbers and flags. */
  44.     Fslcl_DirEntry      dirEntry; /* Directory entry being operated on. */
  45. } LfsDirOpLogEntry;
  46.  
  47. #define    LFS_DIR_OP_LOG_ENTRY_SIZE(entryPtr) \
  48.     ((entryPtr)->dirEntry.recordLength + sizeof(LfsDirOpLogEntryHdr))
  49.  
  50.  
  51. #define    LFS_DIROP_LOG_MAGIC 0x1f5d109
  52. /* procedures */
  53.  
  54. #endif /* _LFSDIROPLOG */
  55.  
  56.